package com.yya.ratelimiter.service;

import lombok.Data;

/**
 * @Autor: yuanyongan
 * @Description: 滑动窗口内每个单位时间分成的小段节点
 * @Date 2023/1/28 13:26
 */

@Data
public class Fragment {
    /**
     * 片段内的计数
     */
    private long counter = 0;
    /**
     * 片段id
     */
    private long beginTime;

    public Fragment(long beginTime){
        this.beginTime = beginTime;
    }

    public void add(long num){
        this.counter += num;
    }


}
